#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2018/8/31 9:36
# @Author  : zejin
# @File    : config_data.py


class ConfigData(object):
    """
    将实例对象变成字典便于访问
    """
    def __init__(self, **kwarg):
        self.__dict__.update(kwarg)

    def __getitem__(self, attr):
        return super(ConfigData, self).__getattribute__(attr)

    def __getattribute__(self, attr):
        return super(ConfigData, self).__getattribute__(attr)


config = ConfigData(
            server_ip='192.168.0.34',
            share_dir=r'\\192.168.0.34\Users',
            D_dish='d',
            project_name='api',
            port=5000,
)


